<?php
include "include/config.inc.php";
if(!isset($_SESSION['s_activId']))
{
  header('location:checkLogin.php');
}

$q = strtolower($_POST['q']);
if(!$item) return;

$itemQuery = "SELECT itemName
                FROM item 
               WHERE itemName LIKE '%$q%'";
$itemQueryRes = mysql_query($itemQuery);
while($itemRow = mysql_fetch_array($itemQueryRes))
{
  $itemName = $itemRow['itemName'];
  echo $itemName."<br>";
}

?>